<?php

class Application_Form_EditarSenha extends Zend_Form
{

    public function init()
    {
        $t = Zend_Registry::get('translator'); 	
        $this->setName('form_editar_senha');
        $this->setAction('');
        $this->setMethod('post');
        
        $senhaAtual = new Zend_Form_Element_Password('senhaAtual');
        $senhaAtual->setLabel($t->translate('SENHA_ATUAL').':');
        $senhaAtual->setAttribs(array('size'=>'25'));
        $senhaAtual->setRequired(true);
        
        $senha = new Zend_Form_Element_Password('senha');
        $senha->setLabel($t->translate('NOVA_SENHA').':');
        $senha->setAttribs(array('size'=>'25'));
        $senha->setRequired(true);        
        
        $senhaConfirm = new Zend_Form_Element_Password('senhaConfirm');
        $senhaConfirm->setLabel($t->translate('CONFIRMAR_NOVA_SENHA').':');
        $senhaConfirm->setAttribs(array('size'=>'25'));
        $senhaConfirm->setRequired(true);       
        
        $criar = new Zend_Form_Element_Submit('Salvar');
        $criar->setAttribs(array('title'=>$t->translate('ALTERAR'),'style'=>'font-weight:bold;'));
        
         $capt = new Zend_Form_Element_Captcha('captcha',array('label' => 'Digite o código abaixo:',
        						'captcha' => array('captcha' => 'Image',
        											'wordLen' => 7,
        											'width' => 140,
        											'height' => 60,
        											'font' => 'fontes/arial.TTF', 
        											'fontSize' => 25,
        											'dotNoiseLevel' => 3,
        											'lineNoiseLevel' => 3,
        											'imgDir' => 'imagens/captcha/', 
        											'imgUrl' => '/imagens/captcha/',
        											'GcFreq' =>10,
        											'Expiration'=>10,
        											)
        				  		)
        				  );
        $capt->setRequired(true);
        $idusuario = new Zend_Form_Element_Hidden('idusuario');        
  
        $this->addElements(array($senhaAtual,$senha,$senhaConfirm,$capt,$idusuario,$criar));
    }


}

